package com.gwm.item.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.gwm.item.service.TbSkuService;
import com.gwm.item.mapper.TbSkuMapper;
import com.gwm.item.pojo.TbSku;
import org.springframework.stereotype.Service;

/**
 * <p>
 * sku表,该表表示具体的商品实体,如黑色的 64g的iphone 8 服务实现类
 * </p>
 *
 * @author heima
 * @since 2020-12-01
 */
@Service
public class TbSkuServiceImpl extends ServiceImpl<TbSkuMapper, TbSku> implements TbSkuService {
    //        update tb_sku set stock=stock-? where id=skuId
    @Override
    public void stockMinus(Integer num, Long skuId) {
        this.getBaseMapper().stockMinus(num,skuId);
    }

    @Override
    public void stockPlus(Integer num, Long skuId) {
        this.getBaseMapper().stockPlus(num,skuId);
    }
}
